<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <!--<link rel="icon" href="../../favicon.ico">-->

    <title>积分系统 - 顾客</title>

    <!-- Bootstrap core CSS -->
    <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link href="//cdn.bootcss.com/bootstrap-table/1.10.1/bootstrap-table.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="style/common.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="#">百花-积分系统</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li><a href="index.html">积分 / 兑换</a></li>
                <li class="active"><a href="javascript: void(0)">顾客</a></li>
                <li><a href="strategy.html">兑换策略</a></li>
            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>

<div class="container">
    <div id="toolbar">
        <div class="form-inline" role="form">
            <div class="form-group">
                <button type="button" class="btn btn-primary" data-toggle="modal"
                        data-target="#customerModal">
                    新增
                </button>
            </div>
            <div class="form-group">
                <button type="button" class="btn btn-default" data-toggle="modal"
                        data-target="#delModal">
                    删除
                </button>
            </div>
        </div>
    </div>

    <!-- Main component for a primary marketing message or call to action -->
    <table id="table"
           data-toggle="table"
           data-toolbar="#toolbar"
           data-show-refresh="true"
           data-url="/customer.do"
           data-side-pagination="server"
           data-pagination="true"
           data-page-size="5"
           data-page-list="[5,15]"
           data-search="true"
           data-id-field="id"
           data-unique-id="id"
           data-click-to-select="true"
           class="table table-hover">
        <thead>
        <tr>
            <th data-valign="middle" data-field="state" data-checkbox="true"></th>
            <th data-valign="middle" data-field="id" data-visible="false">id</th>
            <th data-valign="middle" data-field="cardNo">卡号</th>
            <th data-valign="middle" data-field="name">姓名</th>
            <th data-valign="middle" data-field="mobile">手机</th>
            <th data-valign="middle" data-field="createTime">创建时间</th>
            <th data-valign="middle" data-field="score">可用积分</th>
            <th data-valign="middle" data-width="100px" data-formatter="operationFormatter">操作</th>
        </tr>
        </thead>
    </table>

</div> <!-- /container -->

<!-- Modal -->
<div class="modal fade" id="customerModal" tabindex="-1" role="dialog" aria-labelledby="customerModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="customerModalLabel">新增</h4>
            </div>
            <form id="customerForm" method="post">
                <input type="hidden" id="customerId" name="customerId" value="">
                <div class="modal-body">

                    <div class="form-group">
                        <label for="card_no">卡号</label>
                        <input type="text" required="required" aria-required="true" class="form-control" name="card_no"
                               id="card_no"
                               placeholder="卡号" value="">
                    </div>
                    <div class="form-group">
                        <label for="name">姓名</label>
                        <input type="text" class="form-control" id="name" name="name" placeholder="姓名" value="">
                    </div>
                    <div class="form-group">
                        <label for="mobile">手机</label>
                        <input type="text" class="form-control" id="mobile" name="mobile" placeholder="手机" value="">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">保存</button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- Delete Modal -->
<div class="modal fade" id="delModal" tabindex="-1" role="dialog" aria-labelledby="delModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="delModalLabel">删除顾客</h4>
            </div>

            <div class="modal-body">
                <p class="lead"></p>
            </div>
            <form id="delForm" method="post">
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <input type="hidden" name="ids">
                    <button type="submit" class="btn btn-primary">确定</button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap-table/1.10.1/bootstrap-table.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap-table/1.10.1/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="script/customer.js"></script>
</body>
</html>